-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
MDEV-38041: MariaBackup fails during rollback of inplace FTS alter table #4435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 10.6
Are you sure you want to change the base?
Conversation
|
|
dr-m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks reasonable to me, but I think that it would be good to have regression test coverage of this. I see that you posted a test to MDEV-38041. Could that test be adjusted in some way, for example, by making use of DBUG_MARIABACKUP_EVENT and DBUG_EXECUTE_FOR_KEY, similar to what was done in 6b2da93?
Problem: ======== When an inplace ALTER operation is rolled back, InnoDB drops intermediate tables and their associated FTS internal tables. However, MariaBackup's DDL tracking can incorrectly report this as a backup failure. The issue occurs because backup_set_alter_copy_lock() downgrades the MDL_BACKUP_DDL lock before the inplace phase of ALTER, allowing FTS internal tables to be dropped during the later phases of backup when DDL tracking is still active. Solution: ======== backup_file_op_fail(): Ignore delete operations on FTS internal tables when not using --no-lock option, preventing false positive backup failures.
e18c86b to
76aafdb
Compare
dr-m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I checked that the test fails if the fix is reverted. I only have some comments about formatting or comments.
| filename_to_spacename(name, len).c_str()); | ||
| msg("DDL tracking : delete %" PRIu32 " \"%.*s\"", | ||
| space_id, int(len), name); | ||
| error= "delete"; | ||
| if (fail && !opt_no_lock && | ||
| check_if_fts_table( | ||
| filename_to_spacename(name, len).c_str())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| filename_to_spacename(name, len).c_str()); | ||
| msg("DDL tracking : delete %" PRIu32 " \"%.*s\"", | ||
| space_id, int(len), name); | ||
| error= "delete"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line had been indented with TAB consistently with the rest of the function. Here the indentation is being changed without any good reason.
| /* Ignore the FTS internal table because InnoDB does | ||
| drop intermediate table and their associative FTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace "does drop" with "may drop".
| This leads to the FTS internal table being | ||
| dropped in the late phase of backup. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence feels redundant to me.
Description
Problem:
When an inplace ALTER operation is rolled back, InnoDB drops intermediate tables and their associated FTS internal tables. However, MariaBackup's DDL tracking can incorrectly report this as a backup failure.
The issue occurs because backup_set_alter_copy_lock() downgrades the MDL_BACKUP_DDL lock before the inplace phase of ALTER, allowing FTS internal tables to be dropped during the later phases of backup when DDL tracking is still active.
Solution:
backup_file_op_fail(): Ignore delete operations on FTS internal tables when not using --no-lock option, preventing false positive backup failures.
Release Notes
How can this PR be tested?
Run lot of rollback alter operation of fts table when mariabackup is running.
I have done some debug sync test case.
Test case:
Basing the PR against the correct MariaDB version
mainbranch.PR quality check